import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 查询用户列表
export function listTeam(query) {
  return request({
    url: '/construction/team/list',
    method: 'get',
    params: query
  })
}

export function getTeam(teamId){
  return request({
    url: '/construction/team/' + praseStrEmpty(teamId),
    method : 'get'
  })
}

export function addTeam(data){
  return request({
    url: '/construction/team',
    method: 'post',
    data: data
  })
}

export function updateTeam(data){
  return request({
    url: '/construction/team',
    method: 'put',
    data: data
  })
}

export function deleteTeam(teamId){
  return request({
    url: '/construction/team/'+teamId,
    method: 'delete',
  })
}

export function changeTeamStatus(teamId,teamStatus){
  const data = {
    teamId,
    teamStatus
  }
  return request({
    url: '/construction/team/changeStatus',
    method: 'put',
    data: data
  })
}

